import {Router,Route,hashHistory,IndexRedirect,Link} from "react-router";

export default React.createClass({
	top:function(){
		 document.body.scrollTop = 0
	},
	move : function(){
		var that = this
		document.body.onscroll = function(){
			if(document.body.scrollTop<200){
				  that.setState({
				  	obj :{
				  		display :"none"
				  	}
				  })
			}else{
				that.setState({
				  	obj :{
				  		display :"block"
				  	}
				  })
			}
		}
	},
	componentDidMount: function(){
		 
		 	this.move()
		 
	},
	componentWillUnmount(){
       document.body.onscroll = null
    },
	getInitialState:function(){
		return {
			obj :{
				dispaly : "none"
			}
		}
	},
	render : function(){
		
		return (
			<div className="home_bom_footer_top isme_10">
				<div className="home_bom_btn">
						<Link to="sign">{this.props.data}</Link>
						<Link to="register">{this.props.data2}</Link>
						<Link to="meizi">反馈</Link>
						<a href="javascript:;" onClick={this.top}>返回顶部</a>
					</div>
				<section>
						<a >
							<span className="iconfont home_gooer_top_btn icon-101"></span>
							<p>触屏版</p>
						</a>
						<a>
							<span className="iconfont home_gooer_top_btn icon-pc"></span>
							<p>电脑版</p>
						</a>
				</section>
				<div className="xiao_h_j iconfont icon-rocket" onClick={this.top} style={this.state.obj}></div>
			</div>
		)
	}
})
